import yagmail,os,logging,allure,pytest

class Tools():
    def Log(self):
        log = logging.basicConfig(level=logging.DEBUG,
                                  format='%(levelname)s %(filename)s %(asctime)s %(message)s %(lineno)d ',
                                  filename=r'C:\Users\LENOVO\PycharmProjects\AutoWMS\yuelian2\report\api.log',
                                  filemode='a+')
        return log

    def email(self,file):
        email = yagmail.SMTP(user='2031077871@qq.com',password='ozcetyoqgxljbceh',host='smtp.qq.com')
        email.send(to='2031077871@qq.com',subject='图书系统测试报告',attachments=file)
        email.close()